// pages/picture/picture.js
var img=[
  {
    url:'../../images/picture/1.jpg',
    index:0
  },
  {
    url:'../../images/picture/2.jpg',
    index:1
  },
  {
    url:'../../images/picture/3.jpg',
    index:2
  },
  {
    url:'../../images/picture/4.jpg',
    index:3
  },
  {
    url:'../../images/picture/5.jpg',
    index:4
  },
  {
    url:'../../images/picture/6.jpg',
    index:5
  },
  
]
Page({
  data:{
    hid:true,
  },
  onLoad:function(options){
    // 页面初始化 options为页面跳转所带来的参数
  },
  onReady:function(){
    // 页面渲染完成
  },
  onShow:function(){
    // 页面显示
    var that=this;
    that.setData({
      img:img
    })
    wx.setNavigationBarTitle({
      title: '服务站图片',
    })
    wx.getSystemInfo({
      success: function(res) {
        that.setData({
          height:res.screenHeight
        })
      }
    })
  },
  onHide:function(){
    // 页面隐藏
  },
  onUnload:function(){
    // 页面关闭
  },
  watch:function(e){
    console.log(e)
    this.setData({
      hid:false,
      current:e.currentTarget.dataset.number
    })
  },
  cancel:function(){
    this.setData({
      hid:true
    })
  }
})